﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace WITM.DAL
{
    public interface ISpendingEntryRepository
    {
        IEnumerable<SpendingEntries> GetAll();
        IEnumerable<SpendingEntries> Find(Expression<Func<SpendingEntries, bool>> where);
        SpendingEntries First(Expression<Func<SpendingEntries, bool>> where);

        void Add(SpendingEntries entry);
        void Delete(SpendingEntries entry);
        void Attach(SpendingEntries entry);

        List<SpendingSum> GetTotalCategories(int userID, DateTime? startDate, DateTime? endDate);
        List<SpendingSum> GetTotalItems(int userID, DateTime? startDate, DateTime? endDate);
        List<SpendingSum> GetTotalDays(int userID, DateTime? startDate, DateTime? endDate);
        decimal GetTotalPeriod(int userID, DateTime? startDate, DateTime? endDate);

    }
}
